<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
        <div id="app">
             <!-- 1. lazy
                    - 只有回车或者失去焦点以后才会改变双向绑定的值
            -->
            <input type="text" v-model.lazy="message">
            {{message}}

            <!-- 2. number
                    - 会把绑定的值转化成number
            -->
            <input type="numer" v-model.number="age">
            {{age - 10}}

            <!-- 3. trim
                    - 去掉字符串前后的空格
            -->
            <input type="numer" v-model.trim="name">
            {{name}}
        </div>
        <script src="../js/vue.js"></script>
        <script>
            const app = new Vue({
                el: '#app',
                data: {
                    message: '你好啊',
                    age: '18',
                    name: ''
                }
            })
        </script>
    </body>
</html>